package com.hhq.usercenter.domain.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * <p>Description: 角色菜单关系模型 </p>
 *
 * @author : xiaodong.yang
 * @date : 2024/1/9 17:44
 */
@Table(name = "t_role_menu")
@Entity
@TableName("t_role_menu")
@Setter
@Getter
@org.hibernate.annotations.Table(appliesTo = "t_role_menu", comment = "角色菜单表")
public class RoleMenuModel {

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Id
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "native")
    @ApiModelProperty(value = "主键")
    private Integer id;

    /**
     * 角色id
     */
    @Column(nullable = false, columnDefinition = "int(11)  comment '角色id'")
    @ApiModelProperty(value = "角色id")
    private Integer roleId;

    /**
     * 菜单id
     */
    @Column(nullable = false, columnDefinition = "int(11)  comment '菜单id'")
    @ApiModelProperty(value = "菜单id")
    private Integer menuId;
}
